class Person:
    def work(self):
        print("努力上班")

def play_game(self):
    print("玩游戏")
def work2(self):
    print("好好工作")
Person.play=play_game
Person.work = work2

p=Person()
p.play()
p.work()